//
//  ViewController.swift
//  JKSwiftFive
//
//  Created by 王冲 on 2019/7/12.
//  Copyright © 2019 王冲. All rights reserved.
//

import UIKit

class ViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()

        self.navigationItem.title = "HH"
        view.backgroundColor = UIColor.white
        
        //test1()
        // test2()
        
        
       print(sum(a: 1, b: 2, c: 3)) 
    }
    
    func sum(a:Int,b:Int) -> Int{
        return a + b
    }
    
    func sum(a:Int,b:Int,c:Int) -> Int{
        return a + b + c
    }
    
    
    /// switch 测试所有的情况
    func test2() {
        
        let num = 1
        
        switch num {
        case 1:
            print("这是1")
        case 2:
            print("这是2")
        default:
            print("无法处理")
        }
        
    }

    /// 测试for循环穿透
    func test1() {
        
        for trick in stride(from: 2, to: 10, by: 2) {
            
            print(trick)
        }
        
    }


}

